import type { AccessMenuItem } from '@/stores/access/types';
import type { DeepPartial } from '@/types/helper';
import Mock from 'mockjs';
export default {
  'get|/mock/user/list' : () => {
    return {
      data : Mock.mock({
        "list|10": [
          {
            id: '@id',
            name : '@cname',
            title : '@ctitle',
            content : '@cparagraph',
            date : '@datetime'
          }
        ]
      }),
      code : 200,
      msg : 'success'
    }
  },
  'get|/mock/user/detail' : () => {
    return {
      data : {},
      code : 200,
      msg : 'success'
    }
  },
  'get|/mock/user/id' : {
    data : {},
    code : 200,
    msg : 'success'
  },
  'get|/mock/auth/user' : () => {
    return {
      data : Mock.mock({
        name : '@cname'
      }),
      code : 200,
      msg : 'success'
    }
  },
  'get|/mock/auth/menu/list' : () => {
    return {
      data : Mock.mock([
        {
          name : '首页',
          path : '/home',
          code : '1',
          icon : 'https://unpkg.com/@vbenjs/static-source@0.1.7/source/avatar-v1.webp',
          children : [
            {
              name : '工作台',
              path : '/home/workbench',
              code : '2',
              icon : 'https://unpkg.com/@vbenjs/static-source@0.1.7/source/avatar-v1.webp',
              children : []
            },
            {
              name : '分析台',
              path : '/home/analysis',
              code : '3',
              icon : 'https://unpkg.com/@vbenjs/static-source@0.1.7/source/avatar-v1.webp',
              children : []
            }
          ]
        },
        {
          name : '测试',
          path : '/test',
          code : '4',
          icon : '',
          children : [
            {
              name : '首页',
              path : '/test/test1',
              code : 5,
              icon : '',
              children : []
            }
          ]
        },
        {
          name : '关于',
          path : '/about',
          code : '28',
          isKeepAlive : true,
          icon : 'https://unpkg.com/@vbenjs/static-source@0.1.7/source/avatar-v1.webp',
          children : []
        }
      ] as DeepPartial<AccessMenuItem[]>)
    }
  }
};